Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DXCDT-372: Traverse assets tree for preservable fields #740

Merged
merged 5 commits into from
Feb 14, 2023

Conversation

willvedd
Copy link
Contributor

@willvedd willvedd commented Feb 10, 2023

🔧 Changes

Part two of keyword preservation implementation by building off of #738. This PR introduces the ability to recursively traverse an arbitrary JSON structure and look for preservable properties. The recursion here is necessary because the assets tree is an amalgamation of all the different Auth0 resource types which contain their own arbitrary data structures which may differ on a tenant-by-tenant basis.

Notably, this utility of this function is limited because it only produces a list of the field values to preserve which may help us understand what to preserve but it doesn't provide any guidance on where or how to preserve. The concept of "addresses" will be added in a follow-up PR which will improve the usefulness of this function, but wasn't added to keep this PR simple.

📚 References

Related Issues:

#328
#688

🔬 Testing

Added a single unit test that tests a variety of scenarios.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@willvedd willvedd requested a review from a team as a code owner February 10, 2023 21:34
@willvedd willvedd enabled auto-merge (squash) February 10, 2023 21:34
@willvedd willvedd merged commit c430400 into master Feb 14, 2023
@willvedd willvedd deleted the DXCDT-372-preserve-keywords-traverse-assets branch February 14, 2023 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants